<?php

include('autoload.php');

$user = new User();

$user ->username = mysql_escape_string($_POST['username']);
$user ->password = mysql_escape_string($_POST['password']);
$result = true;
$result = $user->login();

    if ($result)
    {
        
        header('location:student-portal.php');
    }
    
    else
    {
        header('location:admin.php');
        
    }
    
?>